//
//  MGNetworkManager+Extension.swift
//  微博
//
//  Created by 陈明光 on 2019/11/12.
//  Copyright © 2019 陈明光. All rights reserved.
//

import Foundation

//MARK:封装微博的网络请求方法
extension MGNetworkManager {
    
    /// 加载微博数据字典数组
    ///
    /// - Parameter completion: 完成回调（list: 微博字典数组/是否成功）
    func statusList(completion: @escaping ([[String: AnyObject]]?,  Bool)->()){
        let urlString = "https://api.weibo.com/2/statuses/home_timeline.json"
        let params = ["access_token" : "2.00a926kGNUeSHCf02ac3049eZKdVpD"]
        
       // MGNetworkManager.shared.get(urlString, parameters: params, headers: "", progress:nil , success: { (_, json) in
            
//            print(json as Any)
//            let result = json as Any;("statuses") as? [[String: AnyObject]]
//            
//            completion(result,true)
//        }) { (_, error) in
//            print("网络请求失败\(error)")
//        }
    }
}
